import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

// 
import { registerMicroApps, start } from 'qiankun';

const getActiveRule = (hash) => (location) => location.hash.startsWith(hash);

registerMicroApps([
  // {
  //   name: 'reactApp',
  //   entry: '//localhost:3000',
  //   container: '#container',
  //   activeRule: '/app-react',
  // },
  {
    name: 'child-vue2',
    entry: 'http://localhost:8081/',
    container: '#app',
    activeRule: getActiveRule('#/vue2'),
  },
  {
    name: 'child-vue3',
    entry: 'http://localhost:8082/',
    container: '#app',
    activeRule:getActiveRule('#/vue3')
  },
  // {
  //   name: 'angularApp',
  //   entry: '//localhost:4200',
  //   container: '#container',
  //   activeRule: '/app-angular',
  // },
]);
// 启动 qiankun
start();